#include "loginwindow.h"
#include "ui_loginwindow.h"
#include <QMessageBox>
#include <QHttp>

LoginWindow::LoginWindow(QWidget *parent) :
    QDialog(parent),
    m_ui(new Ui::LoginWindow)
{
    m_ui->setupUi(this);
}

LoginWindow::~LoginWindow()
{
    delete m_ui;
}

void LoginWindow::changeEvent(QEvent *e)
{
    QDialog::changeEvent(e);
    switch (e->type()) {
    case QEvent::LanguageChange:
        m_ui->retranslateUi(this);
        break;
    default:
        break;
    }
}

void LoginWindow::on_buttonBox_accepted()
{
    QMessageBox::aboutQt(this, "OK");
    QHttp http;
    QHttpRequestHeader header("POST");
    http.setHost("shushi");
    header.addValue("login", "edwardoid");
    header.addValue("password", "nopassword");
    http.request(header);
}
